package com.atguigu.jxc.controller;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.CustomerReturnList;
import com.atguigu.jxc.service.CustomerReturnListGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :ttm
 * @description :
 */
@RestController
@RequestMapping("/customerReturnListGoods")
public class CustomerReturnListGoodsController {
    @Autowired
    private CustomerReturnListGoodsService customerReturnListGoodsService;
    /**
     * 客户退货单保存
     * 请求URL：http://localhost:8080/customerReturnListGoods/save?returnNumber=XT1605772786495（退货单号）
     * 请求参数：CustomerReturnList customerReturnList, String customerReturnListGoodsStr
     * 请求方式：POST
     * 返回值类型：JSON
     * 返回值：ServiceVO
     */
    @PostMapping("/save")
    public ServiceVO save(CustomerReturnList customerReturnList, String customerReturnListGoodsStr){
        return customerReturnListGoodsService.save(customerReturnList,customerReturnListGoodsStr);
    }
}
